Fix problem where prefix-title-alist was not updated
authorjustbur <justin@burkett.cc>
Tue, 5 Apr 2016 14:05:38 +0000 (10:05 -0400)
committerjustbur <justin@burkett.cc>
Tue, 5 Apr 2016 14:05:38 +0000 (10:05 -0400)
which-key.el

index 891deaaa824bdd0ebcc59c700cd5b0b6700483d2..898109f13b985b0ad4b1177fd44cd0a244ace398 100644 (file)
@@ -780,7 +780,10 @@ addition KEY-SEQUENCE NAME pairs) to apply."
       (setq key-sequence (pop more) name (pop more)))
     (if (assq mode which-key-prefix-name-alist)
         (setcdr (assq mode which-key-prefix-name-alist) mode-name-alist)
-      (push (cons mode mode-name-alist) which-key-prefix-name-alist))))
+      (push (cons mode mode-name-alist) which-key-prefix-name-alist))
+    (if (assq mode which-key-prefix-title-alist)
+        (setcdr (assq mode which-key-prefix-title-alist) mode-title-alist)
+      (push (cons mode mode-title-alist) which-key-prefix-title-alist))))
 (put 'which-key-declare-prefixes-for-mode 'lisp-indent-function 'defun)
 
 (defun which-key-define-key-recursively (map key def &optional recursing)